import request from '@/utils/request'
import { ObjectType, ResponseDataPromise } from 'typings/interfaces'
import * as proxy from '@/constants/proxy'
export const khRequest = (): ResponseDataPromise<ObjectType> =>
  request({
    url: proxy.CHECC_API_CMS + '/sy/budget/getExamine',
    method: 'post',
  })

export const kyRequest = (companyId: string): ResponseDataPromise<ObjectType> =>
  request({
    url: proxy.CHECC_API_CMS + `/sy/budget/getBudget?belongingUnit=${companyId}`,
    method: 'post',
  })

export const slRequest = (year: string): ResponseDataPromise<ObjectType> =>
  request({
    url: proxy.CHECC_API_CMS + `/sy/budget/getTresult?year=${year}`,
    method: 'post',
  })

export const jzRequest = (year: string): ResponseDataPromise<ObjectType> =>
  request({
    url: proxy.CHECC_API_CMS + `/sy/budget/getProjectAccess?year=${year}`,
    method: 'post',
  })

export const szRequest = (year: string): ResponseDataPromise<ObjectType> =>
  request({
    url: proxy.CHECC_API_CMS + `/sy/budget/getDatabase?year=${year}`,
    method: 'post',
  })

export const rcRequest = (): ResponseDataPromise<ObjectType> =>
  request({
    url: proxy.CHECC_API_CMS + '/sy/budget/getExpert',
    method: 'post',
  })

// 查询所有公司
export const getOrgAllInfo = () => {
  return request({
    url: '/checc-api/org/getSysOrgList',
    method: 'get',
  })
}